package com.ttt.gdfood.mapper;

import com.ttt.gdfood.entity.Image;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ImageMapper {
    @Select("select * from image where note_id=#{note_id}")
    List<Image> findById(int note_id);

    @Insert("INSERT INTO image(src,note_id) VALUES(#{src},#{note_id})")
    void addImage(Image image);
}
